<?
	if($model->id==0){
		$hidden['parent_id']=$this->input->get('parent_id');
		$parent_id=$this->input->get('parent_id');
	}else{
		$parent_id=$model->parent_id;
	}
$catlist=ORM::factory('category')->get_pulldown_list(array('0'=>'root'));

?>

<div class='contentheader'>Neues Pagetemplate</div>
<?
echo form::open(NULL, '', $hidden);
echo form::hidden('id', $model->id);
echo form::open_fieldset();
echo myform::inputfield('title', 'Title', $model->title);
echo myform::textarea('description', 'Beschreibung', $model->description);
echo myform::dropdown('parent_id','Parent Category',$catlist, $parent_id);
echo form::close_fieldset();
echo myform::submit();
echo form::close();
?>